// components/common-radio/common-radio.ts
Component({
    /**
     * 组件的属性列表
     */
    properties: {
        options: {
            type: Array,
            value: [],
        },
        value: {
            type: String,
            value: ''
        },
        type: {
            type: String,
            value: ''
        }
    },

    /**
     * 组件的初始数据
     */
    data: {
    },

    /**
     * 组件的方法列表
     */
    methods: {
        onChange(event) {
            console.log('radio选择', event)
            const value = event.detail;
            const type = event.target.dataset;
            this.triggerEvent('change', {
                ...type,
                value: value,
            });
        }
    },
});
